package com.bilicraft;
import java.awt.event.*;

import res.Resources;


public class MButtonRefresh extends MButton implements Runnable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public ServerList serverList;
	public Thread tTt;
	
	public MButtonRefresh(String t, Resources rs, int x, int y){
		super(t,rs,x,y);
	}
	
	public MButtonRefresh(ServerList sl, String t, Resources rs, int x, int y){
		super(t,rs,x,y);
		serverList = sl;
	}
	
	public void mClicked(MouseEvent e){
		System.out.println("Now refresh...");
		if(serverList != null){
			tTt = new Thread(this);
			tTt.start();
		}
	}
	
	
	public void run(){
		serverList.refresh();
	}

}
